<template>
    <div class="my_tab">
        <div :class='{on:tabs_on==1}' class="count" @click="tabs(1)">技术统计</div>
        <div :class='{on:tabs_on==2}' class="radar" @click="tabs(2)">雷达图</div>
    </div>
</template>

<script>
export default {
    data(){
       return {
            tabs_on:1
       }
    },
    methods:{
        tabs(index){
            this.tabs_on = index;
            this.$emit('childByValue', index)
        }
    }
}
</script>

<style lang="less" scoped>
.my_tab{
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #c7e9d6;
    height: 1rem;
    .count,.radar{
        width: 50%;
        height: 100%;
        line-height: 1rem;
        text-align: center;
        color: #42b579;
        position: relative;
    }
    .on{
        &:after{
            content: '';
            width: 100%;
            position: absolute;
            left: 0;
            bottom: 0;
            border-bottom: 2px #42B574 solid;
        }
    }
}
</style>
